#!/bin/bash

. `dirname $0`/../etc/controller.bash.inc
autoload_functions "secu/encrypt_password secu/decrypt_password"

echo '[testing] encrypt_password() and decrypt_password()'
clear_pword='p4ssword05'
enc_pword=$(encrypt_password $clear_pword)
dec_pword=$(decrypt_password $enc_pword)
echo -n ' testing only scenario - '
[[ "$dec_pword" -eq "$clear_pword" ]] && echo "OK" || echo "fail"
